<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class PelEntryTime</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> PelEntryTime</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-vars">Vars</a>
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class for holding a date and time.</p>
<p class="description"><p>This class can hold a timestamp, and it will be used as  in this example where the time is advanced by one week:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-var">$entry&nbsp;</span>=&nbsp;<span class="src-var">$ifd</span><span class="src-sym">-&gt;</span><span class="src-id">getEntry</span><span class="src-sym">(</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">DATE_TIME_ORIGINAL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$time&nbsp;</span>=&nbsp;<span class="src-var">$entry</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryTime.html#methodgetValue">getValue</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;print<span class="src-sym">(</span><span class="src-str">'The&nbsp;image&nbsp;was&nbsp;taken&nbsp;on&nbsp;the&nbsp;'&nbsp;</span>.&nbsp;<a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-var">$time</span><span class="src-sym">,&nbsp;</span><span class="src-str">'jS'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$entry</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryTime.html#methodsetValue">setValue</a><span class="src-sym">(</span><span class="src-var">$time&nbsp;</span>+&nbsp;<span class="src-num">7&nbsp;</span>*&nbsp;<span class="src-num">24&nbsp;</span>*&nbsp;<span class="src-num">3600</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>The example used a standard UNIX timestamp, which is the default  for this class.</p><p>But the Exif format defines dates outside the range of a UNIX  timestamp (about 1970 to 2038) and so you can also get access to  the timestamp in two other formats: a simple string or a Julian Day  Count. Please see the Calendar extension in the PHP Manual for more  information about the Julian Day Count.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Martin Geisler &lt;<a href="mailto:mgeisler@users.sourceforge.net">mgeisler@users.sourceforge.net</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_PelEntryAscii.php.html">/PelEntryAscii.php</a> (line <span class="field"><a href="../__filesource/fsource_PEL__PelEntryAscii.php.html#a172">172</a></span>)
		</p>
		
				
		<pre><a href="../PEL/PelEntry.html">PelEntry</a>
   |
   --<a href="../PEL/PelEntryAscii.html">PelEntryAscii</a>
      |
      --PelEntryTime</pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
												<a href="#sec-vars">Vars</a>
				 
				|
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#EXIF_STRING" title="details" class="const-name">EXIF_STRING</a> = 					<span class="var-type"> 2</span>

				</div>
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#JULIAN_DAY_COUNT" title="details" class="const-name">JULIAN_DAY_COUNT</a> = 					<span class="var-type"> 3</span>

				</div>
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#UNIX_TIMESTAMP" title="details" class="const-name">UNIX_TIMESTAMP</a> = 					<span class="var-type"> 1</span>

				</div>
							</div>
		</div>
	</div>


	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
															<a href="#sec-vars">Vars</a>
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																								<div class="method-definition">
					<img src="../media/images/Constructor.png" alt=" "/>
											<span class="method-result">PelEntryTime</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$tag</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::UNIX_TIMESTAMP</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">int</span>
										<a href="#getValue" title="details" class="method-name">getValue</a>
											([<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::UNIX_TIMESTAMP</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setValue" title="details" class="method-name">setValue</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::UNIX_TIMESTAMP</span>])
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
							<h4>Inherited Variables</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname"><a href="../PEL/PelEntry.html">PelEntry</a></span></p>
					<blockquote>
													<img src="../media/images/Variable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../PEL/PelEntry.html#var$bytes">PelEntry::$bytes</a></span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../PEL/PelEntry.html#var$components">PelEntry::$components</a></span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../PEL/PelEntry.html#var$format">PelEntry::$format</a></span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../PEL/PelEntry.html#var$ifd_type">PelEntry::$ifd_type</a></span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../PEL/PelEntry.html#var$tag">PelEntry::$tag</a></span><br>
							</span>
											</blockquote> 
										
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-vars">Vars</a>
														<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../__filesource/fsource_PEL__PelEntryAscii.php.html#a232">232</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Make a new entry for holding a timestamp.</p>
	
	<div class="method-signature">
		<span class="method-result">PelEntryTime</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$tag</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::UNIX_TIMESTAMP</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$tag</span><span class="var-description">: the Exif tag which this entry represents.  There are  only three standard tags which hold timestamp, so this should be  one of the constants <a href="../PEL/PelTag.html#constDATE_TIME">PelTag::DATE_TIME</a>, <a href="../PEL/PelTag.html#constDATE_TIME_ORIGINAL">PelTag::DATE_TIME_ORIGINAL</a>, or <a href="../PEL/PelTag.html#constDATE_TIME_DIGITIZED">PelTag::DATE_TIME_DIGITIZED</a>.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$timestamp</span><span class="var-description">: the timestamp held by this entry in the correct form  as indicated by the third argument. For <a href="../PEL/PelEntryTime.html#constUNIX_TIMESTAMP">UNIX_TIMESTAMP</a>  this is an integer counting the number of seconds since January  1st 1970, for <a href="../PEL/PelEntryTime.html#constEXIF_STRING">EXIF_STRING</a> this is a string of the form  'YYYY:MM:DD hh:mm:ss', and for <a href="../PEL/PelEntryTime.html#constJULIAN_DAY_COUNT">JULIAN_DAY_COUNT</a> this is a  floating point number where the integer part denotes the day  count and the fractional part denotes the time of day (0.25 means  6:00, 0.75 means 18:00).</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$type</span><span class="var-description">: the type of the timestamp. This must be one of  <a href="../PEL/PelEntryTime.html#constUNIX_TIMESTAMP">UNIX_TIMESTAMP</a>, <a href="../PEL/PelEntryTime.html#constEXIF_STRING">EXIF_STRING</a>, or  <a href="../PEL/PelEntryTime.html#constJULIAN_DAY_COUNT">JULIAN_DAY_COUNT</a>.</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../PEL/PelEntryAscii.html#method__construct">PelEntryAscii::__construct()</a></dt>
						<dd>Make a new PelEntry that can hold an ASCII string.</dd>
					</dl>
			
	</div>
<a name="methodgetValue" id="getValue"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getValue</span> (line <span class="line-number"><a href="../__filesource/fsource_PEL__PelEntryAscii.php.html#a258">258</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the timestamp of the entry.</p>
<p class="description"><p>The timestamp held by this entry is returned in one of three  formats: as a standard UNIX timestamp (default), as a fractional  Julian Day Count, or as a string.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> the timestamp held by this entry in the correct form  as indicated by the type argument. For <a href="../PEL/PelEntryTime.html#constUNIX_TIMESTAMP">UNIX_TIMESTAMP</a>  this is an integer counting the number of seconds since January  1st 1970, for <a href="../PEL/PelEntryTime.html#constEXIF_STRING">EXIF_STRING</a> this is a string of the form  'YYYY:MM:DD hh:mm:ss', and for <a href="../PEL/PelEntryTime.html#constJULIAN_DAY_COUNT">JULIAN_DAY_COUNT</a> this is a  floating point number where the integer part denotes the day  count and the fractional part denotes the time of day (0.25 means  6:00, 0.75 means 18:00).</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getValue
		</span>
					([<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::UNIX_TIMESTAMP</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$type</span><span class="var-description">: the type of the timestamp. This must be one of  <a href="../PEL/PelEntryTime.html#constUNIX_TIMESTAMP">UNIX_TIMESTAMP</a>, <a href="../PEL/PelEntryTime.html#constEXIF_STRING">EXIF_STRING</a>, or  <a href="../PEL/PelEntryTime.html#constJULIAN_DAY_COUNT">JULIAN_DAY_COUNT</a>.</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../PEL/PelEntryAscii.html#methodgetValue">PelEntryAscii::getValue()</a></dt>
						<dd>Return the ASCII string of the entry.</dd>
					</dl>
			
	</div>
<a name="methodsetValue" id="setValue"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">setValue</span> (line <span class="line-number"><a href="../__filesource/fsource_PEL__PelEntryAscii.php.html#a310">310</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Update the timestamp held by this entry.</p>
	<ul class="tags">
				<li><span class="field">todo:</span> How to deal with timezones? Use the TimeZoneOffset tag  0x882A?</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setValue
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::UNIX_TIMESTAMP</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$timestamp</span><span class="var-description">: the timestamp held by this entry in the correct form  as indicated by the third argument. For <a href="../PEL/PelEntryTime.html#constUNIX_TIMESTAMP">UNIX_TIMESTAMP</a>  this is an integer counting the number of seconds since January  1st 1970, for <a href="../PEL/PelEntryTime.html#constEXIF_STRING">EXIF_STRING</a> this is a string of the form  'YYYY:MM:DD hh:mm:ss', and for <a href="../PEL/PelEntryTime.html#constJULIAN_DAY_COUNT">JULIAN_DAY_COUNT</a> this is a  floating point number where the integer part denotes the day  count and the fractional part denotes the time of day (0.25 means  6:00, 0.75 means 18:00).</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$type</span><span class="var-description">: the type of the timestamp. This must be one of  <a href="../PEL/PelEntryTime.html#constUNIX_TIMESTAMP">UNIX_TIMESTAMP</a>, <a href="../PEL/PelEntryTime.html#constEXIF_STRING">EXIF_STRING</a>, or  <a href="../PEL/PelEntryTime.html#constJULIAN_DAY_COUNT">JULIAN_DAY_COUNT</a>.</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../PEL/PelEntryAscii.html#methodsetValue">PelEntryAscii::setValue()</a></dt>
						<dd>Give the entry a new ASCII value.</dd>
					</dl>
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../PEL/PelEntryAscii.html">PelEntryAscii</a></span></p>
					<blockquote>
													<img src="../media/images/Constructor.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntryAscii.html#method__construct">PelEntryAscii::__construct()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntryAscii.html#methodgetText">PelEntryAscii::getText()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntryAscii.html#methodgetValue">PelEntryAscii::getValue()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntryAscii.html#methodsetValue">PelEntryAscii::setValue()</a></span><br>
											</blockquote>
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../PEL/PelEntry.html">PelEntry</a></span></p>
					<blockquote>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodgetBytes">PelEntry::getBytes()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodgetComponents">PelEntry::getComponents()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodgetFormat">PelEntry::getFormat()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodgetIfdType">PelEntry::getIfdType()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodgetTag">PelEntry::getTag()</a></span><br>
													<img src="../media/images/AbstractMethod.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodgetText">PelEntry::getText()</a></span><br>
													<img src="../media/images/AbstractMethod.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodgetValue">PelEntry::getValue()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodsetIfdType">PelEntry::setIfdType()</a></span><br>
													<img src="../media/images/AbstractMethod.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#methodsetValue">PelEntry::setValue()</a></span><br>
													<img src="../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../PEL/PelEntry.html#method__toString">PelEntry::__toString()</a></span><br>
											</blockquote>
										
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-vars">Vars</a>
														| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constEXIF_STRING" id="EXIF_STRING"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">EXIF_STRING</span>
			 = <span class="const-default"> 2</span>
			(line <span class="line-number"><a href="../__filesource/fsource_PEL__PelEntryAscii.php.html#a181">181</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constant denoting a Exif string.</p>
	
	
</div>
<a name="constJULIAN_DAY_COUNT" id="JULIAN_DAY_COUNT"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">JULIAN_DAY_COUNT</span>
			 = <span class="const-default"> 3</span>
			(line <span class="line-number"><a href="../__filesource/fsource_PEL__PelEntryAscii.php.html#a185">185</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constant denoting a Julian Day Count.</p>
	
	
</div>
<a name="constUNIX_TIMESTAMP" id="UNIX_TIMESTAMP"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">UNIX_TIMESTAMP</span>
			 = <span class="const-default"> 1</span>
			(line <span class="line-number"><a href="../__filesource/fsource_PEL__PelEntryAscii.php.html#a177">177</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constant denoting a UNIX timestamp.</p>
	
	
</div>
						
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Tue, 19 Dec 2006 01:08:19 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0</a>
                <a target="_top" href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=108380&amp;type=1" width="88" height="31" border="0" align="right" alt="SourceForge.net Logo" /></a>
	</p>
	</div></body>
</html>